import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import ScrollableTabBarNode from './ScrollableTabBarNode';
import TabBarRootNode from './TabBarRootNode';
import TabBarTabsNode from './TabBarTabsNode';
import SaveRef from './SaveRef';

var ScrollableTabBar = function (_React$Component) {
  _inherits(ScrollableTabBar, _React$Component);

  function ScrollableTabBar() {
    _classCallCheck(this, ScrollableTabBar);

    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
  }

  ScrollableTabBar.prototype.render = function render() {
    var _this2 = this;

    return React.createElement(
      SaveRef,
      null,
      function (saveRef, getRef) {
        return React.createElement(
          TabBarRootNode,
          _extends({ saveRef: saveRef }, _this2.props),
          React.createElement(
            ScrollableTabBarNode,
            _extends({ saveRef: saveRef, getRef: getRef }, _this2.props),
            React.createElement(TabBarTabsNode, _extends({ saveRef: saveRef }, _this2.props))
          )
        );
      }
    );
  };

  return ScrollableTabBar;
}(React.Component);

export default ScrollableTabBar;